import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
import SigninView from '../views/SigninView.vue'
import OrderView from '../views/OrderView.vue'
import CartView from '../views/CartView.vue'
import AboutView from '../views/AboutView.vue'
import SeachView from '../views/SeachView.vue'
import UserView from '../views/UserView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/login',
    name: 'login',
    component: LoginView
  },
  {
    path: '/signin',
    name: 'signin',
    component: SigninView
  },
  {
    path: '/order/:id?',
    name: 'order',
    component: OrderView
  },
  {
    path: '/cart/:id?',
    name: 'cart',
    component: CartView
  },
  {
    path: '/about/:id?',
    name: 'about',
    component: AboutView
  },
  {
    path: '/seach/:id?',
    name: 'seach',
    component: SeachView
  },
  {
    path: '/user/:id?',
    name: 'user',
    component: UserView
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
